package com.xmlstrategys
{
	import com.strategy.IXML;
	import com.utils.Utils;
	
	import flash.utils.ByteArray;
	
	public class XMLItemFurnateInfo extends XMLBase implements IXML
	{
		public function XMLItemFurnateInfo(data:XML)
		{
			super(data);
		}
		
		public function xmlstrategybml():ByteArray
		{
			var sourceByte:ByteArray = Utils.writeHead(6);
			var nodeLen:uint = xmlData.furnates.length();
			sourceByte.writeUnsignedInt(nodeLen);
			
			for each (var xml:XML in xmlData.furnates)
			{
				sourceByte.writeUnsignedInt(xml.@meltID);
				sourceByte.writeUnsignedInt(xml.@firstMenuID);
				sourceByte.writeUnsignedInt(xml.@secondMenuID);
				
				sourceByte.writeUnsignedInt(xml.@meltedItemTmpID);
				sourceByte.writeUnsignedInt(xml.@needItemTmpID);
				sourceByte.writeUnsignedInt(xml.@needItemNum);
			}
			
			return sourceByte;
		}
	}
}